#include <iostream>
#include <string>
#include <string.h>

#include <list>
using namespace std;

typedef struct _node
{
    char alpha;
    int count;

    bool operator < (_node & b) {
       return b.count < count;
      }
}node;

typedef list<node> nodeList;


int main(int argc, char *argv[])
{
   string str; 
   getline(cin,str); 
   //cout<<"len:"<<str.length() <<" "<<str<<endl;

   int sumArr[52];
   memset(sumArr,0,sizeof(int)*52);

   int len = str.length();
   //char * charArr = new char[len];
   
   //strcpy(charArr,str);

   for(int i=0;i<len;i++)
   {
      //cout<<str[i]<<",";

      if(str[i]>='A'&&str[i]<='Z')
      {
         sumArr[str[i]-'A'] += 1;
      }
      else if(str[i]>='a'&&str[i]<='z')
      {
         sumArr[str[i]-'a' + 26] += 1;
      }
   }

   nodeList listNode;
   node tempNode;
   for(int j=0;j<52;j++)
   {
      if(sumArr[j]>0)
      {
         if(j<26)
         {
             tempNode.alpha = j+'A';
         }
         else
         {
             tempNode.alpha = j+'a'-26;
         }
         tempNode.count = sumArr[j];
         listNode.push_back(tempNode);
      }
   }

   
   listNode.sort();

   nodeList::iterator itNode = listNode.begin();
   
   while(itNode!=listNode.end())
   {
     cout << itNode->alpha <<":"<<itNode->count<<";";
     itNode++;
   }
   
   cout<<endl;
   
   //delete charArr;
   listNode.clear();
   return 0;   
    
}
